package org.x.casemodule.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.x.casemodule.enums.EventType;
import org.x.casemodule.enums.MethodEnum;

import java.util.Date;
import java.util.List;

@Data
public class ScheduleCreateRequest {
    @NotNull(message = "事件类型不能为空")
    private EventType eventType;

    @NotEmpty(message = "标题不能为空")
    private String title;

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @NotNull(message = "结束时间不能为空")

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    private List<Long> participants;
    private String location;
    private Reminder reminder;
    private Boolean checkConflict = false;
    private Long caseId;
    private Long creatorId;

    @Data
    public static class Reminder {
        private List<MethodEnum> methods;
        private Integer advanceMinutes;
    }
}
